import { IPublicTypeJSExpression } from '@alilc/lowcode-types';

/**
 * 样式集
 */
export interface LcCssSheet {
  /**
   * 样式名称
   */
  name: string;

  /**
   * 选择器
   * @description .put-super-type
   */
  selector: string;

  style?: React.CSSProperties;
}

const node = {
  componentName: 'Button',
  props: {
    style: {},
    className: 'button button--big',
    classNameJS: {
      type: 'JSExpression',
      // value: `button ${this.state.xxx === 1 ? 'button--big' : ''}`,
    },
    __classNames: [
      {
        selector: '.button',
      },
      {
        selector: '.button--big',
        condition: {
          type: 'JSExpression',
          value: `this.state.xxx === 1`,
        },
      },
    ],
  },
};

export type LcClassName = LcClassNames[];

export interface LcClassNames {
  condition: IPublicTypeJSExpression;
  selector: string;
  classNames: string[];
}
